typedef struct Database Database;
struct Database { /* ... */ };

Database* get_instance() {
    static Database* instance = NULL;
    if (!instance) {
        instance = malloc(sizeof(Database));
        // 初始化
    }
    return instance;
}